package com.wang.learn.common.domain;

import com.wang.learn.common.model.DeleteEnum;
import lombok.Data;

import java.time.Instant;
import java.util.Objects;

/**
 * <p>TODO</p>
 *
 * @author wcz
 * @version V1.0.0
 * @date 2022/11/22 19:36
 */
@Data
public class BaseEntity<E> implements Entity<BaseEntity<E>> {
    private Long id;

    private Instant createTime;

    private Instant updateTime;

    private Long createUser;

    private Long updateUser;

    private DeleteEnum deleteFlag;

    private Long tenantId;

    @Override
    public boolean same(BaseEntity<E> other) {
        return Objects.equals(this.id,other.id);
    }
}
